﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ThongTinPhatSinh.ascx.cs" Inherits="QuanLyDeTaiKHCN.UserControls.Others.ThongTinPhatSinh" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="udt1" runat="server">
    <ContentTemplate>
        <div class="control-group info row-fluid">
            <fieldset style="width:100%;">
                <legend>Thông tin phát sinh</legend>
                 <label class="control-label" style="width: 250px; padding-right: 10px;">Ngày phát sinh thông tin</label>
                    <div class="controls">
                        <asp:TextBox ID="txtNgayPhatSinhThongTin" runat="server" CssClass="span2" onblur="KiemTraInjection(this);"></asp:TextBox>
                        <asp:ImageButton runat="Server" ID="ImageButton2" ImageUrl="~/CSS/images/lich.gif" AlternateText="Click để hiển thị ngày tháng năm" />
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtNgayPhatSinhThongTin" PopupButtonID="ImageButton2" Format="dd/MM/yyyy" />
                        <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender3" MaskType="Date" runat="server" Mask="99/99/9999" TargetControlID="txtNgayPhatSinhThongTin"></ajaxToolkit:MaskedEditExtender>
                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ValidationGroup="kiemtra" ControlToValidate="txtNgayPhatSinhThongTin" Text="Nhập ngày gia hạn" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                <div style="height:5px;"></div>
                <label class="control-label" style="width: 250px; padding-right: 10px;">Nội dung</label>
                <div class="controls">
                    <asp:TextBox ID="txtNoiDung" runat="server" CssClass="span10" TextMode="MultiLine" Height="50" onblur="KiemTraInjection(this);"></asp:TextBox>
                    <br /><asp:RequiredFieldValidator ForeColor="Red" ID="yc" ControlToValidate="txtNoiDung" ValidationGroup="kiemtra" Text="Nhập thông tin phát sinh" runat="server" Display="Dynamic"></asp:RequiredFieldValidator>
                </div>
                <div style="height:5px;"></div>
                <label class="control-label" style="width: 250px; padding-right: 10px;"></label>
                <div class="controls">
                    <asp:LinkButton ID="btnsave" class="btn btn-primary" OnClick="btnsave_Click" ValidationGroup="kiemtra" runat="server"><i class=" icon-save"></i>&nbsp;&nbsp;Lưu</asp:LinkButton>
                    <asp:LinkButton ID="btnAdd" class="btn btn-primary" OnClick="btnAdd_Click" runat="server"><i class=" icon-plus"></i>&nbsp;&nbsp;Thêm thông tin</asp:LinkButton>
                    <asp:Label ID="lblstatus" runat="server" ForeColor="Red"></asp:Label>
                </div>
                <div style="height:5px;"></div>
                <input type="hidden" runat="server" id="inputID" />
            </fieldset>
            <div style="height:5px;"></div>
                <fieldset style="padding:5px;">
                    <legend>Danh sách thông tin phát sinh</legend>
                    <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" ForeColor="#333333" OnRowDeleting="grid_RowDeleting" OnRowEditing="grid_RowEditing">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Ngày ghi chú">
                                <ItemTemplate>
                                    <asp:Label ID="lblngay" runat="server" Text='<%#Eval("NgayGhiChu") %>'></asp:Label>
                                    <asp:Label ID="lblID" runat="server" Visible="false" Text='<%#Eval("ID") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="ItemGridCell" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Nội dung">
                                <ItemTemplate>
                                    <asp:Label ID="lblnoidung" runat="server" Text='<%#Eval("NoiDung") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="ItemGridCell" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Lần">
                                <ItemTemplate>
                                    <asp:Label ID="lbllan" runat="server" Text='<%#Eval("Lan") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="true" HeaderText="Xóa">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" Text="<i class='icon-remove red'></i> Xóa"></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="true" HeaderText="Chọn">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Edit" Text="<i class='icon-edit'></i> Chọn"></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </fieldset>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>